package net.huashitong.service.money;

import net.huashitong.mapper.money.SsMoneyVipMapper;
import net.huashitong.ssydt.money.entity.SsMoneyVip;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.08.18
 */
@Service
@Transactional
public class SsMoneyVipServiceImpl implements SsMoneyVipService {
    /**
     * 一天的毫秒数
     */
    private static final long DAY_MILLISECOND = 86400000L;
    @Autowired
    private SsMoneyVipMapper mapper;
    @Autowired
    private SsMoneyGoldService ssMoneyGoldService;


    @Override
    public SsMoneyVip getByUserId(String userId) {
        return mapper.getByUserId(userId);
    }

    @Override
    public void save(SsMoneyVip ssMoneyVip) {
        mapper.insert(ssMoneyVip);
    }

    @Override
    public void updateSelective(SsMoneyVip ssMoneyVip) {
        mapper.updateByPrimaryKeySelective(ssMoneyVip);
    }


}
